package global

import (
	"context"
	redis "github.com/go-redis/redis/v8"
	"go.uber.org/zap"
	"gorm.io/gorm"
	"server/config"
)

type Redis struct {
	Ctx  context.Context
	Conn *redis.Client
}

var (
	GVL_LOG   *zap.SugaredLogger
	GVL_CFG   *config.CONFIG
	GVL_DB    *gorm.DB
	GVL_REDIS *Redis
)

// 环境配置
const (
	DEV  = iota //开发环境
	UAT         //测试环境
	PROD        //开发环境
)

var (
	ENVIRONMENT     int
	ENVIRONMENT_MAP = map[int]string{DEV: "dev", UAT: "uat", PROD: "prod"}
)

// 管理员登录token
var (
	SYSTEM_LOGIN_TOKEN = "addminsystem"
)
